<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
</head>
<body>
<%
	
		Cookie c = new Cookie("Faisal","is good");
		response.addCookie(c);
		c = new Cookie("Turki","is good");
		response.addCookie(c);
		c = new Cookie("Saud","is good");
		response.addCookie(c);
		
		c = new Cookie("Faisal P","is good");
		c.setMaxAge(10000);
		response.addCookie(c);
		c = new Cookie("Turki","is good");
		c.setMaxAge(10000);
		response.addCookie(c);
		c = new Cookie("Saud","is good");
		c.setMaxAge(10000);
		response.addCookie(c);

	Cookie[] cookies = request.getCookies();
	if (cookies != null)
	{
		Cookie cookie;
		for (int i = 0; i < cookies.length; i++)
		{
			cookie = cookies[i];
			out.println("<TR>\n" + "  <TD>" + cookie.getName() + "\n"
					+ "  <TD>" + cookie.getValue());
		} 
		for(Cookie c : cookies)
		{
			c.getName();	
		}
		for (int i = 0; i < 3; i++)
		{
			cookie = cookies[i];
			out.println("<TR>\n" + "  <TD>"
					+ session.getAttribute("Session" + i) + "\n");
		}
		out.println("</TABLE>");

	}
%>
</body>
</html>